package com.atguigu.eduservice.controller;

import com.atguigu.commonutils.R;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassName : EduLoginController
 * @Author : 骆发茂
 * @Date: 2021/9/27 21:08
 * @Description :
 */
@RestController
@RequestMapping("/eduservice/user")
@CrossOrigin  //解决跨域
public class EduLoginController {

    //login
    @PostMapping("login")
    public R login() {
        return R.ok().data("token", "admin");
    }

    //info
    @GetMapping("info")
    public R info() {
        return R.ok().data("roles", "[admin]").data("name", "admin").data("avatar", "https://guli-file-1304955331.cos.ap-guangzhou.myqcloud.com/avatar/%E5%A4%B4%E5%83%8F.jpg");
    }
}